package com.wf.ew.JTServer.common.handle;

import com.wf.ew.JTServer.common.db.JT809Dao;
import com.wf.ew.JTServer.common.packet.JT809Packet0x1202;
import com.wf.ew.orderB.biz.CarGpsBiz;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author: Xiuming Lee
 * @Date: 2019/9/23 16:04
 * @Version 1.0
 * @Describe:
 */
public class JT809Packet0x1202Handle extends SimpleChannelInboundHandler<JT809Packet0x1202> {

	private static Logger log = LoggerFactory.getLogger(JT809Packet0x1202Handle.class);
	@Autowired
	private CarGpsBiz carGpsBiz;

	@Override
	protected void channelRead0(ChannelHandlerContext ctx, JT809Packet0x1202 msg) {
		log.info("车辆定位信息：{}", msg.toString());
		// if (msg.getVec1() > 0 || msg.getVec2() > 0) {
		JT809Dao.insert0x1202(msg);
//		carGpsBiz.add2(msg);
		// }
	}
}
